Event and Ticket Access information
It is crucial to highlight that menta does not intervene in the access management of your events. Access control remains entirely the responsibility of your system and team.
The QR code of the tickets we generate is the same as the one originally generated on your platform. This means these QR codes will be scanned and processed normally, without any alteration or additional adjustments required in your scanning system.
However, to ensure proper tracking and updating of ticket statuses, menta requires receiving the scanning information of the tickets. This is achieved by implementing an API call to our system immediately after a ticket has been scanned and authorized on your platform.
Individual Ticket Authorization Notification
- cURL
- Python
- Java
- PHP
curl -X POST 'https://api.mentatickets.com/v1/tickets/${ticketId}/eventAdmission'
-H 'Authorization: YOUR_API_KEY'
-H 'Content-Type: application/json'
import requests
ticket_id = "YOUR_TICKET_ID"
url = f"https://api.mentatickets.com/v1/tickets/{ticket_id}/eventAdmission"
api_key = "YOUR_API_KEY"
headers = {"Authorization": api_key}
response = requests.post(url, headers=headers)
print(response.json())
import okhttp3.*;
import java.io.IOException;
OkHttpClient client = new OkHttpClient();
String ticketId = "YOUR_TICKET_ID";
String url = "https://api.mentatickets.com/v1/tickets/" + ticketId + "/eventAdmission";
Request request = new Request.Builder()
.url(url)
.addHeader("Authorization", "YOUR_API_KEY")
.post(RequestBody.create(null, new byte[0]))
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
} catch (IOException e) {
e.printStackTrace();
}
<?php
$ticket_id = "YOUR_TICKET_ID";
$url = "https://api.mentatickets.com/v1/tickets/{$ticket_id}/eventAdmission";
$api_key = "YOUR_API_KEY";
$headers = array("Authorization: {$api_key}");
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, "");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$response_data = json_decode($response, true);
print_r($response_data);
?>
Respuesta JSON
{
"status": 200,
"data": true,
"errors": null
}
Parameters
ticketId
: The unique ID of the ticket that you sent to us at the time of the user’s purchase completion. This ID is internal to your platform.
Group Ticket Authorization Notification
- cURL
- Python
- Java
- PHP
curl -X POST 'https://api.mentatickets.com/v1/tickets/batch/eventAdmission'
-H 'Authorization: YOUR_API_KEY'
-H 'Content-Type: application/json'
--data-raw '[
{
"ticketId": "TICKET_ID_1",
"entryDate": "2023-09-01T12:00:00Z"
},
{
"ticketId": "TICKET_ID_2",
"entryDate": "2023-09-01T12:05:00Z"
},
{
"ticketId": "TICKET_ID_3",
"entryDate": "2023-09-01T12:10:00Z"
}
]'
import requests
ticket_id = "YOUR_TICKET_ID"
url = f"https://api.mentatickets.com/v1/tickets/batch/eventAdmission"
api_key = "YOUR_API_KEY"
headers = {"Authorization": api_key}
data = {[
{
"ticketId": "TICKET_ID_1",
"entryDate": "2023-09-01T12:00:00Z"
},
{
"ticketId": "TICKET_ID_2",
"entryDate": "2023-09-01T12:05:00Z"
},
{
"ticketId": "TICKET_ID_3",
"entryDate": "2023-09-01T12:10:00Z"
}
]}
response = requests.post(url, headers=headers, json=data)
print(response.json())
import okhttp3.*;
import java.io.IOException;
OkHttpClient client = new OkHttpClient();
String url = "https://api.mentatickets.com/v1/tickets/batch/eventAdmission";
String json = "[\n" +
" {\n" +
" \"ticketId\": \"TICKET_ID_1\",\n" +
" \"entryDate\": \"2023-09-01T12:00:00Z\"\n" +
" },\n" +
" {\n" +
" \"ticketId\": \"TICKET_ID_2\",\n" +
" \"entryDate\": \"2023-09-01T12:05:00Z\"\n" +
" }\n" +
"]";
RequestBody body = RequestBody.create(
json, MediaType.parse("application/json; charset=utf-8")
);
Request request = new Request.Builder()
.url(url)
.addHeader("Authorization", "YOUR_API_KEY")
.post(body)
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
} catch (IOException e) {
e.printStackTrace();
}
<?php
$ticket_id = "YOUR_TICKET_ID";
$url = "https://api.mentatickets.com/v1/tickets/batch/eventAdmission";
$api_key = "YOUR_API_KEY";
$headers = array("Authorization: {$api_key}");
$data = array(
array(
"ticketId" => "TICKET_ID_1",
"entryDate" => "2023-09-01T12:00:00Z"
),
array(
"ticketId" => "TICKET_ID_2",
"entryDate" => "2023-09-01T12:05:00Z"
),
array(
"ticketId" => "TICKET_ID_3",
"entryDate" => "2023-09-01T12:10:00Z"
)
);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$response_data = json_decode($response, true);
print_r($response_data);
?>
Respuesta JSON
{
"status": 200,
"data": true,
"errors": null
}
Parameters
ticketId
: The unique ID of the ticket that you sent to us at the time of the user’s purchase completion. This ID is internal to your platform.entryDate
: (OPTIONAL) Date of access. If not provided, the current date will be used.
Once we have this information, we can notify the user that a ticket has already been used and cannot be used again.
Remember to use the ticket ID that you use within your platform.